# Some useful Unicode entities
# Non-Breaking Space
snippet nbs
	&nbsp;
# ←
snippet left
	&#x2190;
# →
snippet right
	&#x2192;
# ↑
snippet up
	&#x2191;
# ↓
snippet down
	&#x2193;
# ↩
snippet return
	&#x21A9;
# ⇤
snippet backtab
	&#x21E4;
# ⇥
snippet tab
	&#x21E5;
# ⇧
snippet shift
	&#x21E7;
# ⌃
snippet control
	&#x2303;
# ⌅
snippet enter
	&#x2305;
# ⌘
snippet command
	&#x2318;
# ⌥
snippet option
	&#x2325;
# ⌦
snippet delete
	&#x2326;
# ⌫
snippet backspace
	&#x232B;
# ⎋
snippet escape
	&#x238B;
# Generic Doctype
snippet doctype HTML 4.01 Strict
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
	"http://www.w3.org/TR/html4/strict.dtd">
snippet doctype HTML 4.01 Transitional
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""
	"http://www.w3.org/TR/html4/loose.dtd">
snippet doctype HTML 5
	<!DOCTYPE HTML>
snippet doctype XHTML 1.0 Frameset
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
snippet doctype XHTML 1.0 Strict
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
snippet doctype XHTML 1.0 Transitional
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
snippet doctype XHTML 1.1
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
# HTML Doctype 4.01 Strict
snippet docts
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""
	"http://www.w3.org/TR/html4/strict.dtd">
# HTML Doctype 4.01 Transitional
snippet doct
	<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""
	"http://www.w3.org/TR/html4/loose.dtd">
# HTML Doctype 5
snippet doct5
	<!DOCTYPE HTML>
# XHTML Doctype 1.0 Frameset
snippet docxf
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
# XHTML Doctype 1.0 Strict
snippet docxs
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
# XHTML Doctype 1.0 Transitional
snippet docxt
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
# XHTML Doctype 1.1
snippet docx
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
snippet html
	<html>
	${1}
	</html>
snippet xhtml
	<html xmlns="http://www.w3.org/1999/xhtml">
	${1}
	</html>
snippet body
	<body>
		${1}
	</body>
snippet head
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">

		<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>
		${2}
	</head>
snippet title
	<title>${1:`substitute(Filename('', 'Page Title'), '^.', '\u&', '')`}</title>${2}
snippet script
	<script type="text/javascript" charset="utf-8">
		${1}
	</script>${2}
snippet scriptsrc
	<script src="${1}.js" type="text/javascript" charset="utf-8"></script>${2}
snippet style
	<style type="text/css" media="${1:screen}">
		${2}
	</style>${3}
snippet base
	<base href="${1}" target="${2}">
snippet r
	<br>
snippet div
	<div id="${1:name}">
		${2}
	</div>
# Embed QT Movie
snippet movie
	<object width="$2" height="$3" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
	 codebase="http://www.apple.com/qtactivex/qtplugin.cab">
		<param name="src" value="$1">
		<param name="controller" value="$4">
		<param name="autoplay" value="$5">
		<embed src="${1:movie.mov}"
			width="${2:320}" height="${3:240}"
			controller="${4:true}" autoplay="${5:true}"
			scale="tofit" cache="true"
			pluginspage="http://www.apple.com/quicktime/download/"
		>
	</object>${6}
snippet fieldset
	<fieldset id="$1">
		<legend>${1:name}</legend>

		${3}
	</fieldset>
snippet form
	<form name="${1:default_form}" action="${2:#}" method="${3:get}" accept-charset="utf-8">
	<p>
		${4}
	</p>
	</form>
snippet h1
	<h1 id="${1:heading}">${2:$1}</h1>
snippet input
	<input type="${1:text/submit/hidden/button}" value="${2}" ${3}/>${4}
snippet label
	<label for="${2:$1}">${1:name}</label><input type="${3:text/submit/hidden/button}" name="${4:$2}" value="${5}" id="${6:$2}">${7}
snippet link
	<link rel="${1:stylesheet}" href="${2:/css/master.css}" type="text/css" media="${3:screen}" charset="utf-8">${4}
snippet mailto
	<a href="mailto:${1:joe@example.com}?subject=${2:feedback}">${3:email me}</a>
snippet meta
	<meta name="${1:name}" content="${2:content}">${3}
snippet opt
	<option value="${1:option}">${2:$1}</option>${3}
snippet optt
	<option>${1:option}</option>${2}
snippet select
	<select name="${1:some_name}" id="${2:$1}">
		<option value="${3:option}">${4:$3}</option>
	</select>${5}
snippet table
	<table border="${1:0}">
		<tr><th>${2:Header}</th></tr>
		<tr><th>${3:Data}</th></tr>
	</table>${4}
snippet textarea
	<textarea name="${1:Name}" rows="${2:8}" cols="${3:40}">${4}</textarea>${5}
snippet o3dclient
	<div id="${1:o3d}" style="width: ${2}px; height: ${3}px;"></div>${4}
snippet hide
	<div style="display:none">
		${1}
	</div>
snippet shader
	<textarea id="${1:ShaderName}">
		${2}
	</textarea>
snippet o3dinit
	function init(){
		o3djs.webgl.makeClients(${1:initStep2});${2}
	}${3}
snippet o3dinit2
	function ${1:initStep2}(clientElements){
		var o3dElement = clientElements[0];
		${2}
	}
snippet o3duninit
	function uninit(){
		if (${1:g_client}){
			${2:g_client}.cleanup();
		}
	}
snippet rcallback
	function ${1:renderCallback}(renderEvent){
		${2}
	}
snippet function
	function ${1}(${2}){
		${3}
	}
snippet cube
	function createCube(material){
		var cube_Shape = g_pack.createObject('Shape');
		var cube_Primitive = g_pack.createObject('Primitive');
		var streamBank = g_pack.createObject('StreamBank');
		cube_Primitive.material = material;
		cube_Primitive.owner = cube_Shape;
		cube_Primitive.streamBank = streamBank;
		cube_Primitive.primitiveType = g_o3d.Primitive.TRIANGLELIST;
		cube_Primitive.numberPrimitives = 12;
		cube_Primitive.numberVertices = 8;
		cube_Primitive.createDrawElement(g_pack, null);
		var positionArray = [
	 	-0.5, -0.5,  0.5,  // vertex 0
	     0.5, -0.5,  0.5,  // vertex 1
	  	 -0.5,  0.5,  0.5,  // vertex 2
	     0.5,  0.5,  0.5,  // vertex 3
	    -0.5,  0.5, -0.5,  // vertex 4
	     0.5,  0.5, -0.5,  // vertex 5
	    -0.5, -0.5, -0.5,  // vertex 6
	     0.5, -0.5, -0.5   // vertex 7
		];
		var indicesArray = [
	      0, 1, 2,  // face 1
	      2, 1, 3,
	      2, 3, 4,  // face 2
	      4, 3, 5,
	      4, 5, 6,  // face 3
	      6, 5, 7,
	      6, 7, 0,  // face 4
	      0, 7, 1,
	      1, 7, 3,  // face 5
	      3, 7, 5,
	      6, 0, 4,  // face 6
	      4, 0, 2
		];
		var pos_vertexBuffer = g_pack.createObject('VertexBuffer');//dict
		var pos_FloatField = pos_vertexBuffer.createField('FloatField', 3);
		pos_vertexBuffer.set(positionArray);
		var indexBuffer = g_pack.createObject('IndexBuffer');
		indexBuffer.set(indicesArray);
		streamBank.setVertexStream(
			g_o3d.Stream.POSITION,	
			0,
			pos_FloatField,
			0);
		cube_Primitive.indexBuffer = indexBuffer;
	
		return cube_Shape;
	}${1}
snippet if
	if (${1}){
		${2}
	}${3}
